
FROM openjdk:8-alpine

RUN wget -O /tmp/rocketmq.zip https://downloads.apache.org/rocketmq/4.9.0/rocketmq-all-4.9.0-bin-release.zip \
  && unzip /tmp/rocketmq.zip -d / \
  && sed -i 's/ -Xms4g -Xmx4g -Xmn2g//g' /rocketmq-all-4.9.0-bin-release/bin/runserver.sh \
  && sed -i 's/ -Xms8g -Xmx8g -Xmn4g//g' /rocketmq-all-4.9.0-bin-release/bin/runbroker.sh \
  && rm -rf /tmp/*

ENV TZ=Asia/Shanghai \ 
  LANG=C.UTF-8 \
  JAVA_OPT=" -Duser.home=/tmp" \
  run_foreground=false

# EXPOSE 9876
# EXPOSE 10909 10911 10912

WORKDIR /rocketmq-all-4.9.0-bin-release/bin

CMD ["java", "-version"]
